/*LICENSE_BEGIN
 * ******************************************************************
 * Copyright 2006 by the Dainamite Robocup-Team at the
 * DAI-Labor, TU-Berlin (www.dai-labor.de)
 * 
 * Members of Dainamite are:
 * Holger Endert
 * Robert Wetzker
 * Thomas Karbe
 * Axel Heßler
 * Philippe Bütter
 * Felix Brossmann
 * 
 * Licensed under the GNU GPL (General Public License) Free Software 
 * License, Version 2. You may use this file only in compliance with 
 * the License. You may obtain a copy of the License at:
 * 
 * http://www.fsf.org/licensing/licenses/gpl.txt
 * ******************************************************************
LICENSE_END*/
package robocup.component.actionfactories;

import robocup.component.WorldModel;
import robocup.component.actions.AttentionToAction;
import robocup.component.worldobjects.Player;

/**
 * A class for creating AttentionToActions based on the current world-model.
 * It should be extended, such that a state can select an attention value
 * with a certain logic.
 */
public class AttentionToActionFactory {

	/**
	 * Gets the attention to action for a certain player based on his 
	 * state and the world.
	 * @param world -
	 *            world
	 * 
	 * @return AttentionTo Action
	 */
	public synchronized static AttentionToAction getAction(WorldModel world) {

		Player[] player = world.getTeammates();

		AttentionToAction att = new AttentionToAction(
				player[world.getCycle() % 11], world.getTeamName());
		return att;

	}
}
